<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Pike_Session_SaveHandler_Doctrine</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Pike_Session_SaveHandler_Doctrine</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Pike Session SaveHandler for Doctrine. Do you like Doctrine as much as we do? You can  use this plugin to make sure your sessions are saved to the database using Doctrine 2 ORM based  on entities. In order to make it work correctly follow these steps:</p>
<p class="description"><p><ol><li>Make a entity for your session data table and implement the methods of</li></ol> Pike_Session_Entity_Interface in it.</p><p>2. Copy the Pike folder to your library and add Pike as namespace in your application.ini  autoloaderNamespaces[] = &quot;Pike&quot;</p><p>3. Configure Zend_Application_Resource_Session to make it use this save handler and set some other cool options:  resources.session.saveHandler.class = &quot;Pike_Session_SaveHandler_Doctrine&quot;  resources.session.saveHandler.options.lifetime = 3600  resources.session.saveHandler.options.entityName = &quot;Namespace\To\Your\Entity\Session&quot;</p><p>And you can enjoy Doctrine even more!</p></p>
	<ul class="tags">
				<li><span class="field">copyright:</span> Copyright (C) 2011 by Pieter Vogelaar (platinadesigns.nl) and Kees Schepers (keesschepers.nl)</li>
				<li><span class="field">license:</span> MIT</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_Session---SaveHandler---Doctrine.php.html">/Session/SaveHandler/Doctrine.php</a> (line <span class="field"><a href="../__filesource/fsource_Pike__SessionSaveHandlerDoctrine.php.html#a50">50</a></span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
												<div class="var-title">
					static <span class="var-type">Doctrine\ORM\EntityManager</span>
					<a href="#$em" title="details" class="var-name">$em</a>
				</div>
																																												<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$_entityName" title="details" class="var-name">$_entityName</a>
				</div>
																<div class="var-title">
					<span class="var-type">integer</span>
					<a href="#$_lifetime" title="details" class="var-name">$_lifetime</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																												<div class="method-definition">
					static 						<span class="method-result">void</span>
										<a href="#setEntitityManager" title="details" class="method-name">setEntitityManager</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">\\$em</span>, <span class="var-type">Doctrine\ORM\EntityManager</span>&nbsp;<span class="var-name">$em</span>)
									</div>
																								
												<div class="method-definition">
											<span class="method-result">Pike_Session_SaveHandler_Doctrine</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											(<span class="var-type">Zend_Config|Array</span>&nbsp;<span class="var-name">$config</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#close" title="details" class="method-name">close</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#destroy" title="details" class="method-name">destroy</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$id</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#gc" title="details" class="method-name">gc</a>
											(<span class="var-type">type</span>&nbsp;<span class="var-name">$maxlifetime</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#open" title="details" class="method-name">open</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$save_path</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$name</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#read" title="details" class="method-name">read</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$id</span>)
									</div>
																								<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#write" title="details" class="method-name">write</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$id</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$data</span>)
									</div>
																<div class="method-definition">
											<span class="method-result"><a href="../Pike/Pike_Session_Entity_Interface.html">Pike_Session_Entity_Interface</a></span>
										<a href="#_getEntity" title="details" class="method-name">_getEntity</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$id</span>)
									</div>
								</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$em" id="$em"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			static <span class="var-type">Doctrine\ORM\EntityManager</span>
			<span class="var-name">$em</span>
						(line <span class="line-number"><a href="../__filesource/fsource_Pike__SessionSaveHandlerDoctrine.php.html#a55">55</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_entityName" id="$_entityName"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$_entityName</span>
			 = <span class="var-default"> 'session'</span>			(line <span class="line-number"><a href="../__filesource/fsource_Pike__SessionSaveHandlerDoctrine.php.html#a60">60</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_lifetime" id="$_lifetime"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">integer</span>
			<span class="var-name">$_lifetime</span>
						(line <span class="line-number"><a href="../__filesource/fsource_Pike__SessionSaveHandlerDoctrine.php.html#a67">67</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Lifetime of your session</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodsetEntitityManager" id="setEntitityManager"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static method setEntitityManager</span> (line <span class="line-number"><a href="../__filesource/fsource_Pike__SessionSaveHandlerDoctrine.php.html#a104">104</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the EntityManager for Doctrine communication</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">void</span>
		<span class="method-name">
			setEntitityManager
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">\\$em</span>, <span class="var-type">Doctrine\ORM\EntityManager</span>&nbsp;<span class="var-name">$em</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">Doctrine\ORM\EntityManager</span>
				<span class="var-name">$em</span>			</li>
					<li>
				<span class="var-type">EntityManager</span>
				<span class="var-name">\\$em</span>			</li>
				</ul>
		
			
	</div>

<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number"><a href="../__filesource/fsource_Pike__SessionSaveHandlerDoctrine.php.html#a74">74</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Pike_Session_SaveHandler_Doctrine</span>
		<span class="method-name">
			__construct
		</span>
					(<span class="var-type">Zend_Config|Array</span>&nbsp;<span class="var-name">$config</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">Zend_Config|Array</span>
				<span class="var-name">$config</span>			</li>
				</ul>
		
			
	</div>
<a name="methodclose" id="close"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">close</span> (line <span class="line-number"><a href="../__filesource/fsource_Pike__SessionSaveHandlerDoctrine.php.html#a129">129</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			close
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methoddestroy" id="destroy"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">destroy</span> (line <span class="line-number"><a href="../__filesource/fsource_Pike__SessionSaveHandlerDoctrine.php.html#a198">198</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Removes a session entity given by a ID</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			destroy
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$id</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$id</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgc" id="gc"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">gc</span> (line <span class="line-number"><a href="../__filesource/fsource_Pike__SessionSaveHandlerDoctrine.php.html#a217">217</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Garbage collector</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			gc
		</span>
					(<span class="var-type">type</span>&nbsp;<span class="var-name">$maxlifetime</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">type</span>
				<span class="var-name">$maxlifetime</span><span class="var-description">: given by php ini setting gc_maxlifetime</span>			</li>
				</ul>
		
			
	</div>
<a name="methodopen" id="open"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">open</span> (line <span class="line-number"><a href="../__filesource/fsource_Pike__SessionSaveHandlerDoctrine.php.html#a120">120</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			open
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$save_path</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$save_path</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$name</span>			</li>
				</ul>
		
			
	</div>
<a name="methodread" id="read"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">read</span> (line <span class="line-number"><a href="../__filesource/fsource_Pike__SessionSaveHandlerDoctrine.php.html#a143">143</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Reads the session from the entity. If the session is expired it will be removed  and the function will return an empty string (this is very important, otherwise the  PHP session handler will fail!).</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			read
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$id</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$id</span>			</li>
				</ul>
		
			
	</div>
<a name="methodwrite" id="write"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">write</span> (line <span class="line-number"><a href="../__filesource/fsource_Pike__SessionSaveHandlerDoctrine.php.html#a175">175</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Writes the session to the entity. If entity doesn't exist it's created.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			write
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$id</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$data</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$id</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$data</span><span class="var-description">: Serialized array data</span>			</li>
				</ul>
		
			
	</div>
<a name="method_getEntity" id="_getEntity"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">_getEntity</span> (line <span class="line-number"><a href="../__filesource/fsource_Pike__SessionSaveHandlerDoctrine.php.html#a115">115</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the Session entity</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Pike/Pike_Session_Entity_Interface.html">Pike_Session_Entity_Interface</a></span>
		<span class="method-name">
			_getEntity
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$id</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$id</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Thu, 15 Sep 2011 16:07:45 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>